package com.example.demo.controller;

import com.example.demo.Exception.CodeInvalidException;
import com.example.demo.Exception.ProblemNotFoundException;
import com.example.demo.compile.Answer;
import com.example.demo.compile.Question;
import com.example.demo.compile.Task;
import com.example.demo.service.CompileService;
import com.example.demo.vo.CompileRequest;
import com.example.demo.vo.CompileResponse;
import com.example.demo.dao.pojo.ProblemInfo;
import com.example.demo.service.ProblemService;
import com.example.demo.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class CompileController {

    @Autowired
    private CompileService compileService;

    @PostMapping("/compile")
    public Result compile(@RequestBody CompileRequest compileRequest) {
        return compileService.compile(compileRequest);
    }
}